package com.stedu.service;

import com.stedu.bean.Admin;
import com.stedu.bean.Owner;
import com.stedu.exception.SteduException;

import java.util.List;
import java.util.Map;

public interface AdminService {
    Admin login(String username, String password) throws SteduException;
    boolean insert(Admin admin) throws SteduException;
    boolean updateByOid(Admin admin) throws SteduException;
    boolean updateByPid(Admin admin) throws SteduException;
    boolean deleteByOid(Integer oid)throws SteduException;
    boolean deleteByPid(Integer oid)throws SteduException;
    List<Admin> sellectAll();
    Admin sellectByOid(Integer oid);
    Admin sellectByPid(Integer pid);
    List<Admin>sellectByRoot(Integer root);
    List<Map<String, Object>> selectTop5DnameAndCount();
    List<Map<String, Object>> selectTop5PnameAndCount();

}
